from functools import partial

def read_file_chunk_1(file_path, block_size=1024 * 8):
    with codecs.open(file_path, 'r', 'utf-8') as fp:
        while True:
            chunk = fp.read(block_size)
            if not chunk:
                break
            yield chunk


def read_file_chunk_2(file_path, block_size=1024 * 8):
    with codecs.open(file_path, 'r', 'utf-8') as fp:
        for chunk in iter(partial(fp.read, block_size), ''):
            yield chunk